package cn.zwx.goods.svc.rpc.dto;

import lombok.Data;
import org.apache.dubbo.apidocs.annotations.RequestParam;
import org.hibernate.validator.constraints.Length;

import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import java.util.List;

/**
 * @author zhangwenxue
 */
@Data
public class GenerateSkuListDTO {


    @Length(max = 32,message = "商品名称不能超过32位")
    @RequestParam(value = "商品名称",description = "商品名称",required = true)
    @NotBlank(message = "商品名称不能为空")
    private String spuName;

    /**
     * spu 属性
     */
    @Valid
    @RequestParam(value = "spu属性",description = "spu属性",required = true)
    @NotNull(message = "spu属性不能为空")
    private List<BuilderAttrDTO> attrSpuList;
}
